﻿using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using Newtonsoft.Json;

namespace Smugmug
{
    [XmlType("Images"), JsonObject]
    public class ImageCollection : List<Image>
    {
    }

    [JsonObject]
    public class Image : IIdentifiable<int>
    {
        [XmlAttribute("id"), JsonProperty("id")]
        public int Id { get; set; }
        [XmlAttribute]
        public string Key { get; set; }

        [XmlAttribute]
        public string FileName { get; set; }
        [XmlAttribute]
        public string Caption { get; set; }
        [XmlAttribute]
        public string Keywords { get; set; }
        [XmlAttribute]
        public int Position { get; set; }
        [XmlAttribute]
        public string Date { get; set; }
        [XmlAttribute]
        public string Format { get; set; }
        [XmlAttribute]
        public int Serial { get; set; }
        [XmlAttribute]
        public bool Hidden { get; set; }
        [XmlAttribute]
        public int Size { get; set; }
        [XmlAttribute]
        public int Width { get; set; }
        [XmlAttribute]
        public int Height { get; set; }
        [XmlAttribute]
        public string MD5Sum { get; set; }
        [XmlAttribute]
        public string LastUpdated { get; set; }
        [XmlAttribute("AlbumURL"), JsonProperty("AlbumURL")]
        public string AlbumUrl { get; set; }
        [XmlAttribute("TinyURL"), JsonProperty("TinyURL")]
        public string TinyUrl { get; set; }
        [XmlAttribute("ThumbURL"), JsonProperty("ThumbURL")]
        public string ThumbUrl { get; set; }
        [XmlAttribute("SmallURL"), JsonProperty("SmallURL")]
        public string SmallUrl { get; set; }
        [XmlAttribute("MediumURL"), JsonProperty("MediumURL")]
        public string MediumUrl { get; set; }
        [XmlAttribute("LargeURL"), JsonProperty("LargeURL")]
        public string LargeUrl { get; set; }
        [XmlAttribute("XLargeURL"), JsonProperty("XLargeURL")]
        public string XLargeUrl { get; set; }
        [XmlAttribute("X2LargeURL"), JsonProperty("X2LargeURL")]
        public string X2LargeUrl { get; set; }
        [XmlAttribute("X3LargeURL"), JsonProperty("X3LargeURL")]
        public string X3LargeUrl { get; set; }
        [XmlAttribute("OriginalURL"), JsonProperty("OriginalURL")]
        public string OriginalUrl { get; set; }
        [XmlAttribute("Video320URL"), JsonProperty("Video320URL")]
        public string Video320Url { get; set; }
        [XmlAttribute("Video640URL"), JsonProperty("Video640URL")]
        public string Video640Url { get; set; }
        [XmlAttribute("Video960URL"), JsonProperty("Video960URL")]
        public string Video960Url { get; set; }
        [XmlAttribute("Video12800URL"), JsonProperty("Video12800URL")]
        public string Video12800Url { get; set; }
        [XmlAttribute]
        public string Latitude { get; set; }
        [XmlAttribute]
        public string Longtitude { get; set; }
        [XmlAttribute]
        public string Altitude { get; set; }
        public Album Album { get; set; }
    }
}